<template>
	<!-- 我的-设置 -->
	<view class="setUp public">
		<view class="empty"></view>
		<view class="main">
			<view class="main-item">
				<view class="main-item-main flexjcsb" @click="JumpPersonalData">
					<view class="">
						个人资料
					</view>
					<view class="">
						<uni-icons type="forward"></uni-icons>
					</view>
				</view>
			</view>
			<view class="main-item">
				<view class="main-item-main flexjcsb" @click="JumpAbout">
					<view class="">
						关于
					</view>
					<view class="">
						<uni-icons type="forward"></uni-icons>
					</view>
				</view>
			</view>
		</view>
		<view class="footer exitLogin" @click="exitLogin">
			退出登录
		</view>
	</view>
</template>

<script>
	export default {
		methods: {
			exitLogin(){
				uni.showModal({
					content:'您确定要退出登录吗？',
					success(res) {
						if(res.confirm) {
							uni.removeStorageSync('token')
							setTimeout(() => {
								uni.switchTab({
									url:'/pages/my/myView'
								})
							},1000)
						} else if (res.cancel) {
							uni.showToast({
								title:'您取消了退出登录',
								icon:'none',
								duration:2000
							})
						}
					}
				})
			},
			// 跳转个人资料
			JumpPersonalData(){
				uni.navigateTo({
					url:'../../my/SystemEntry/personalData'
				})
			},
			// 跳转关于
			JumpAbout(){
				uni.navigateTo({
					url:'../../my/SystemEntry/about'
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.setUp {
		background: #F7F7F7;
		.empty {
			height: 10rpx;
		}
		.main {
			.main-item {
				background: white;
				.main-item-main {
					width: 638rpx;
					height: 104rpx;
					margin: auto;
					border-bottom: 1px solid #E6E6E6;
				}
			}
			.main-item:last-child .main-item-main {
				border: none;
			}
		}

		.footer {
			width: 750rpx;
			height: 88rpx;
			text-align: center;
			line-height: 88rpx;
			background: #FFFFFF;
			margin-top: 34rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #2E2E2E;
		}
	}
</style>